from historytest.models import MemberPreference, MemberProfile, Employer, Industry
from django.contrib.auth.models import User
from modelhistory.histories import model_histories


a = Industry()
a.name = "Software"
a.save()

b = MemberPreference()
b.name = "Don't Bug Me Still"
b.save()

c = Employer()
c.name = "Software Company Inc."
c.street_address = "111 Software Way"
c.city = "Software City"
c.country = "CA"
c.postal_code = 11111
c.save()
c.industries = [a]
c.save()

d = MemberProfile()
e = User.objects.create_user("roberto","roberto@someplace.org","password")
e.save()
d.user = e
d.company = c
d.save()

d.preferences = [b]
d.save()